package com.zw.hrm.feignclients;

import com.zw.hrm.fallback.FastdfsFeignClientFallbackFactory;
import com.zw.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "fastdfs-server", fallbackFactory = FastdfsFeignClientFallbackFactory.class)
public interface FastdfsFeignClient {
    @GetMapping("/fastdfs/download")
    public byte[] download(@RequestParam("path") String path);
    @PostMapping("/fastdfs/uploadBytes")
    public AjaxResult uploadBytes(@RequestBody byte[]  file, @RequestParam("extName") String extName);
}
